package com.sky.controller.user;

import com.sky.result.Result;
import com.sky.service.UserCategoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/category")
public class UserCategoryController {
	
	private final UserCategoryService userCategoryService;
	
	public UserCategoryController(UserCategoryService userCategoryService) {this.userCategoryService = userCategoryService;}
	
	@GetMapping("/list")
	public Result categoryList(Integer type) {
		return userCategoryService.categoryList(type);
	}
}
